<template>
  <!-- 卡片部分 -->
  <el-card style="margin: 20px">
    <!-- 头部公共组件 -->
    <ComTitle>
      <template>
        <el-button type="success" icon="el-icon-edit" @click="addUser"
          >添加菜单</el-button
        ></template
      >
    </ComTitle>
    <el-table
      :data="dateList"
      style="width: 100%"
      row-key="id"
      border
      lazy
      :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
    >
      <el-table-column prop="date" label="标题" width="180" porp="title">
      </el-table-column>
      <el-table-column prop="name" label="权限点代码" width="180">
      </el-table-column>
      <el-table-column prop="address" label="操作"> </el-table-column>
    </el-table>
  </el-card>
</template>

<script>
// ,add,update,remove,detail
import { list } from '@/api/base/menus'
export default {
  data() {
    return {
      dateList: [],
      pid: '',
      code: '',
      title: ''
    }
  },
  methods: {
    // 搜索
    search() {},
    // 新增
    addUser() {}
  },
  async created() {
    const data = await list()
    this.dateList = data
    console.log(data)
  }
}
</script>

<style scoped lang='scss'></style>
